package textapp.business;

public class MessageUtil {
	
	public static String cutStr(String str, int length, boolean appendDots) {
		if (str == null) {
			return null;
		}
		
		if (str.length() > length) {
			str = str.substring(0, length);
		}
		
		if (appendDots) {
			str = str + "..";
		}
		
		return str;
	}
}
